// pages/appLetWork/work6/divorce.js
Page({
  data: {
    fei: 0,
    feiban: 0,
    isInvolving_property: false,
    isInvolving_property_text: "不涉及财产",
    money: ""
  },
  onClickLeft() {
    wx.navigateTo({
      url: '/pages/home/home',
    })
  },
  isInvolving_propertyChange({ detail }) {
    this.setData({
      isInvolving_property: detail
    });
    if (detail) {
      this.setData({
        isInvolving_property_text: "涉及财产"
      });
    } else {
      this.setData({
        isInvolving_property_text: "不涉及财产"
      });
    }
  },
  formsubmit(e) {
    let bd = Number(e.detail.value.property)
    if (bd <= 200000) {
      this.setData({
        fei: 300,
        feiban: 150
      })
    } else {
      let fei = (bd - 200000) * 0.005 + 300;
      let feiban = fei / 2;
      fei = fei.toFixed(2)
      feiban = feiban.toFixed(2);
      this.setData({
        fei, feiban
      })
    }
  },
  /**
   * 表单重置
   */
  formReset() {
    this.setData({
      fei: 0,
      feiban: 0,
      money: "",
      isInvolving_property: false,
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})